package com.laolei.eureka.feign;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;

@EnableFeignClients
@EnableEurekaClient
@SpringBootApplication
public class SpringEurekaFeignConfigApplication implements CommandLineRunner{
	@Autowired DemoApi demoApi;
	public static void main(String[] args) {
		SpringApplication.run(SpringEurekaFeignConfigApplication.class, args);
	}
	@Override
	public void run(String... args) throws Exception {
		for (int i = 0; i < 100; i++) {
			System.err.println("完成累加到第"+i+"个结果集是: "+demoApi.add(1*i, 3*i));
		}
	}
}
